import ray

ray.init(address='ray://192.168.10.98:10001', namespace='colors')


@ray.remote
class Actor:

    def __init__(self):
        self.i = 0

    def get(self):
        return self.i

    def incr(self, value):
        self.i += value
        return self.i


# driver_1.py
# Job 1 creates an actor, "orange" in the "colors" namespace.
ac = Actor.options(name='orange', lifetime='detached').remote()

obj_ref = ac.incr.remote(19)
